From: Alex Z Date: Sun, 14 Sep 2008 03:02:02 +0000 (+0000) Subject: * Update title protection to be more consistent with regular protection X-Git-Tag: 1.31.0-rc.0~45317 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=121aad8d609efe0040f002691498e7d2a5691124;p=lhc%2Fweb%2Fwiklou.git * Update title protection to be more consistent with regular protection * Make protection log output somewhat more consistent. --- diff --git a/includes/LogPage.php b/includes/LogPage.php index 2b821e9f4f..312e8002d8 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -204,10 +204,15 @@ class LogPage { $params[2] = isset( $params[2] ) ? self::formatBlockFlags( $params[2], is_null( $skin ) ) : ''; } else if ( $type == 'protect' && count($params) == 3 ) { - $details .= " {$params[1]}"; // restrictions and expiries + $details .= "{$params[1]}"; // restrictions and expiries if( $params[2] ) { $details .= ' ['.wfMsg('protect-summary-cascade').']'; } + # If this is going to be displayed, make it somewhat consistent with page history + # and older log entries where everything is treated as a comment + if (!is_null($skin)) { + $details = $skin->commentBlock($details); + } } $rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details; } diff --git a/includes/Title.php b/includes/Title.php index 79c875c175..6599b917bb 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1403,7 +1403,8 @@ class Title { $log = new LogPage( 'protect' ); if( $create_perm ) { - $log->addEntry( $this->mRestrictions['create'] ? 'modify' : 'protect', $this, trim( $reason . " [create=$create_perm] $expiry_description" ) ); + $params = array("[create=$create_perm] $expiry_description",''); + $log->addEntry( $this->mRestrictions['create'] ? 'modify' : 'protect', $this, trim( $reason ), $params ); } else { $log->addEntry( 'unprotect', $this, $reason ); }